package cfca.paperless.client.servlet._3_assist._3_13_GetSealImageUsageRecord;

import cfca.paperless.client.servlet.PaperlessClient;
import cfca.paperless.client.servlet.PaperlessConfig;
import cfca.paperless.client.util.StringUtil;

/**
 * @Description 3.9 自助生成图片接口（测试用例）
 * @Author dell
 * @Date 2016-5-16
 * @CodeReviewer TODO
 */
public class GetSealImageUsageRecordTest01 {

    public static void main(String[] args) throws Exception {
        try {
            PaperlessClient clientBean = new PaperlessClient(PaperlessConfig.assistUrl, 10000, 60000);// 无纸化辅助接口的访问URL

            // 操作员编码或者机构号
            String operatorCode = PaperlessConfig.operatorCode;
            // 渠道编码，可以为空
            String channelCode = PaperlessConfig.channelCode;

            String businessCode = "1";
            String requestXml = "<Request><BusinessCode>" + businessCode + "</BusinessCode></Request>";

            String result = clientBean.getSealImageUsageRecord(requestXml, operatorCode, channelCode);

            String code = StringUtil.getNodeText(result, "Code");
            if (!code.equals("200")) {
                System.out.println("getSealImageUsageRecord");
                System.out.println(result);
            } else {
                System.out.println(result);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
